<?php
require dirname(__FILE__).'/function.php';

function curl_post($url, $post) {
    $options = array(
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HEADER         => false,
        CURLOPT_POST           => true,
        CURLOPT_POSTFIELDS     => $post,
    );

    $ch = curl_init($url);
    curl_setopt_array($ch, $options);
    $result = curl_exec($ch);
    curl_close($ch);
    return $result;
}

$data = curl_post("http://localhost/phplearn/postmethod/post.php", array('name'=>'caiknife', 'email'=>'caiknife@gmail.com'));

//curl  -i -d    "name='jingzhengyi'&email='caiknife@gmail.com'" "http://localhost/phplearn/postmethod/post.php"
//curl   -i -d   "account=admintjdaoch&sign=6bbdcd4045b79879122117cb527660c1&clientOrderId=20150905132358954"  "http://if.dahanfc.com/FCSearchReportDataServlet"
// /可以直接用上面的发送请求！！！！！！
echo $data ;

